/**
 * @author wcj
 * @Date 2021/6/2 11:17
 * @Version 1.0
 */
public class TestBigObjAllocation {

    private static final int _1MB = 1024 * 1024;

    /**
     * -verbose:gc -Xms20m -Xmx20m -Xmn10m -XX:+PrintGCDetails -XX:+UseSerialGC -XX:SurvivorRatio=8 -XX:PretenureSizeThreshold=3145728
     * 大对象直接进入老年代
     */
    public static void test() {
        byte[] allocation = new byte[4 * _1MB];
    }

    public static void main(String[] args) {
        test();
    }
}
